# Maintainer: Felix Yan <felixonmars@archlinux.org>

pkgname=ukui-sidebar
pkgver=3.1.2
pkgrel=1
pkgdesc="Parallels toolbox for UKUI"
arch=('loong64' 'x86_64')
license=('GPL')
url="https://github.com/ukui/ukui-sidebar"
groups=('ukui')
depends=('libqtxdg' 'ukui-interface')
makedepends=('qt5-tools')
source=("https://github.com/ukui/ukui-sidebar/archive/v$pkgver/$pkgname-$pkgver.tar.gz")
sha512sums=('713dd286827157efceb590f3034f19bf043391df871a2a3e38a6bf421f5827c2bb3aee01ccc9974f779c95cba4f3a1df1a98be91de7afaf7ce88c387185b5030')

prepare() {
  cd ukui-sidebar-$pkgver
  sed -i 's/ xtst//' src/ukui-sidebar-core.pro
}

build() {
  cd ukui-sidebar-$pkgver
  qmake-qt5 PREFIX=/usr
  make
}

package() {
  cd ukui-sidebar-$pkgver
  make INSTALL_ROOT="$pkgdir" install

  install -Dm644 src/data/ukui-sidebar.desktop -t "$pkgdir"/etc/xdg/autostart/
}
